package com.atguigu.gulimall.auth.demos.utils;

import java.util.Random;

public class CodeUtils {
    public static String getCode(Integer len){

        StringBuilder stringBuilder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < len; i++) {
            int i1 = random.nextInt(10);
            stringBuilder.append(i1);
        }
        return stringBuilder.toString();
    }
}
